package com.lingnan.tijian.controller;

import com.lingnan.tijian.dto.ApiResponse;
import com.lingnan.tijian.dto.CalendarRequestDto;
import com.lingnan.tijian.service.ifac.CalendarService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@RestController
public class CalendarController {

    @Autowired
    CalendarService calendarService;

    @RequestMapping("/listAppoinmentCalendar")
    public ApiResponse listAppoinmentCalendar(@RequestBody CalendarRequestDto calendarRequestDto, HttpServletRequest request){
        return new ApiResponse(ApiResponse.SUCCESS_STATUS,ApiResponse.SUCCESS_DESC,calendarService.listAppointmentCalendar(calendarRequestDto));
    }

@RequestMapping("/listAppoinmentCalendar2")
    public ApiResponse list2(){
        return new ApiResponse(ApiResponse.SUCCESS_STATUS,ApiResponse.SUCCESS_DESC,calendarService.listAppointmentCalendar(calendarRequestDto));
    }

}
